<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/10/26 0026
  Time: 10:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
<form method="post" action="${pageContext.request.contextPath}/user/userListPage">
    <table>
        <tr>
            <td colspan="4">用户名<input type="text" name="userName" value="${userName}"></td>
            <td><input type="submit" value="提交"></td>
        </tr>
        <tr>
            <td>ID</td>
            <td>账号</td>
            <td>姓名</td>
            <td>密码</td>
            <td>性别</td>
            <td>日期</td>
        </tr>
        <c:forEach var="user" items="${listPage}">
            <tr>
                <td>${user.id}</td>
                <td>${user.userCode}</td>
                <td>${user.userName}</td>
                <td>${user.userPassword}</td>
                <td>${user.gender}</td>
                <td><fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd"/></td>
            </tr>
        </c:forEach>
        <tr>
            <td>${pageIndex}</td>
            <td><a href="${pageContext.request.contextPath}/user/userListPage?pageIndex=${pageIndex-1}">上一页</a></td>
            <td><a href="${pageContext.request.contextPath}/user/userListPage?pageIndex=${pageIndex+1}">下一页</a></td>
        </tr>
    </table>
    <form/>
</body>
</html>
